package com.yjc.drygoods.coupon.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yjc.common.to.CouponTo;
import com.yjc.common.utils.PageUtils;
import com.yjc.common.vo.MemberRespVo;
import com.yjc.drygoods.coupon.entity.CouponEntity;
import com.yjc.drygoods.coupon.entity.CouponHistoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 优惠券领取历史记录
 *
 * @author yjc
 * @email yjc19979401754@126.com
 * @date 2022-08-19 23:06:24
 */
public interface CouponHistoryService extends IService<CouponHistoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 根据用户id获取该用户所有的优惠券
     * @param memberId
     * @return
     */
    List<CouponEntity> getCouponByMemberId(Long memberId);

    void updateMemberCouponUseType(List<CouponHistoryEntity> res);

    void saveOrUpdateCouponHistory(MemberRespVo memberRespVo, CouponTo coupon) throws Exception;
}

